<%-- 
    Document   : console_admin
    Created on : 30/Nov/2009, 15:22:38
    Author     : Daniel
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<jsp:useBean class="Cliente.WebGestor" id="webMyTwi" scope="session"/>

<%
        String op = request.getParameter("search");
        String[] users = null;

        if ("Search".equalsIgnoreCase(op)) {
            String searchString = request.getParameter("lookingforsomeone");
            System.out.println("----------------------------------------------" + searchString);
            users = webMyTwi.getGereAdmin().efectuaPesquisa(searchString);
            if(users!=null)
                System.out.println("Resultado:" + users[1]);
        }
%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <table>
            <tr>
                <td>
                    <form name="Search" action="" method="post" >
                        <input type="text" name="lookingforsomeone" value="" size="10" style="color:gray; background:transparent; background-image:url(IMG/bg-txt.png);background-repeat:repeat"/><input type="submit" value="Search" name="search"/>
                    </form>
                    <form name="Select" action="BackOffice_falls.jsp" target="f1" method="post" >
                        <select name="users" size="8" style="background:transparent; background-image:url(IMG/bg-txt.png);background-repeat:repeat">
                            <%
            if (users != null) {
                for (int i = 1; i < users.length; i++) {
                            %>
                            <option value="<%=users[i]%>" style="color:gray"> <%=users[i]%> </option>
                            <%
                }
            }
                            %>
                            <option style="color:gray" disabled>_____________________</option>
                        </select>
                        <input type="submit" value="Select" name="select" />
                        <input type="submit" value="Delete" name="select"/>
                    </form>
                </td>
                <td><iframe src="BackOffice_falls.jsp" width="600" frameborder="0" scrolling="0" height="215" name="f1"></iframe></td>
            </tr>
        </table>
    </body>
</html>
